<!DOCTYPE HTML>

<html lang="pt-br" 
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content=""/>
<meta name="author" content=""/>

<link href="#{facesContext.externalContext.request.contextPath}/view/resources/bootstrap/css/bootstrap.css" rel="stylesheet" media="screen"/>
<link href="#{facesContext.externalContext.request.contextPath}/view/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"/>
<link href="#{facesContext.externalContext.request.contextPath}/view/resources/bootstrap/css/bootstrap-select.css" rel="stylesheet" media="screen"/>
<link href="#{facesContext.externalContext.request.contextPath}/view/resources/bootstrap/css/bootstrap-responsive.css" rel="stylesheet" media="screen"/>
<link href="#{facesContext.externalContext.request.contextPath}/view/resources/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen"/>
<link rel="icon" type="image/png" href="#{facesContext.externalContext.request.contextPath}/view/resources/imagem/png/glyphicons_044_keys.png"/>
	
<title>Dallas Moto Peças</title>

<style type="text/css">
body {
	padding-top: 90px;
	padding-bottom: 40px;
	background-image: url("#{facesContext.externalContext.request.contextPath}/view/resources/imagem/fundo-negro.jpg");
}

.form-signin {
	max-width: 300px;
	height: 200px;
	padding: 5px 5px 5px;
	margin: 0 auto 20px;
	background-color: #FFFFFF;
	border: 1px solid #FFFFFF;
        -webkit-border-radius: 5px;
           -moz-border-radius: 5px;
                border-radius: 5px;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
           -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
</style>

</h:head>
<h:body align="center">
	<p:ajaxStatus onstart="PF('statusDialog').show();" onsuccess="PF('statusDialog').hide();"/>  
              
	<p:dialog modal="true" 
			widgetVar="statusDialog" 
			header="Aguarde"   
        	draggable="false" 
        	closable="false"
        	resizable="false"
        	style="width:200px;">  
    	<p:graphicImage value="/view/resources/imagem/gif-load.gif"/>  
	</p:dialog>
	
	
	
	<div class="container">
	
		<h:form id="form" styleClass="form-signin">
			<p:growl id="growl" showDetail="true" sticky="true" autoUpdate="true"/>
			<h2 class="form-signin-heading" id="cabecalho">Login</h2>
			
			<p:inputText id="inputLogin" 
						required="true" 
						styleClass="input-block-level" 
						requiredMessage="Por favor informe o login." 
						maxlength="20"
						value="#{usuarioManagerBean.usuarioBean.login}"/>
		    <p:watermark value="Login" for="inputLogin"/>
		    
		     <p:password id="inputSenha" 
		    			required="true"
		    			styleClass="input-block-level" 
		    			requiredMessage="Por favor informe a senha."
		    			maxlength="20" 
		    			value="#{usuarioManagerBean.usuarioBean.senha}"/>
			<p:watermark value="Senha" for="inputSenha"/>
			
			<p:commandButton id="btnLogar" 
						value="Logar" 
						actionListener="#{usuarioManagerBean.logar}" 
						update="growl"
						styleClass="btn btn-block btn-info"/>
			
		</h:form>
	</div>	
</h:body>
</html>